/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

// no comment.

package org.lovelandhs.robotics.y2010;

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import org.lovelandhs.robotics.y2010.camera.Camera;


/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class Robot extends IterativeRobot {

	private RobotDrive drive;
	private DriverStation station;

	private Joystick leftStick;
	private Joystick rightStick;

	private Kicker kicker;

	private Camera camera;

	public Robot() {
		drive = new RobotDrive(1, 2, 3, 4);
		station = DriverStation.getInstance();

		leftStick = new Joystick(1);
		rightStick = new Joystick(2);

		kicker = new Kicker(1, 2);

		camera = new Camera();
	}

    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {
		
    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
		camera.turn();

        drive.arcadeDrive(leftStick);

		if (leftStick.getButton(Joystick.ButtonType.kTrigger)) {
			kicker.retract();
		} else {
			kicker.push();
		}
    }
    
}
